import { defHttp } from '@/utils/http/axios';

export interface FormDefine {
  id?: number;
  name: string;
  code: string;
  status?: string;
  // ...其他字段
}

export function getFormList(params: any) {
  return defHttp.get({ url: '/workflow/form/list', params });
}

export function getFormDetail(id: number) {
  return defHttp.get({ url: `/workflow/form/${id}` });
}

export function addForm(data: FormDefine) {
  return defHttp.post({ url: '/workflow/form', data });
}

export function editForm(data: FormDefine) {
  return defHttp.put({ url: '/workflow/form', data });
}

export function deleteForms(idList: number[]) {
  return defHttp.delete({ url: `/workflow/form/batch/${idList.join(',')}` });
}
